package mall.dao;

import mall.model.bo.MallAddOrderBO;
import mall.model.bo.MallSendContentBO;
import mall.model.bo.MallSettleAccountsBO;
import mall.model.tempob.CommentInfoFromOrder;
import mall.model.tempob.OrderInfoFromSpec;
import mall.model.tempob.OrderInfoFromUser;
import mall.model.vo.MallGetOrderByStateVO;
import mall.model.vo.MallOrderGoodsInfoVO;

import java.util.List;

/*
 *
 * @author Yonni
 * @version 1.8.0_201
 * @date 2020-06-01 21:08
 *
 * */
public interface MallOrderDao {

    OrderInfoFromUser getOrderInfoFromUser(String token);

    OrderInfoFromSpec getOrderInfoFromSpec(Integer goodsDetailId);

    String getOrderInfoFromGoods(Integer goodsId);

    void addOrder(MallAddOrderBO addOrderBO, OrderInfoFromUser user, OrderInfoFromSpec spec, String goods);

    List<MallGetOrderByStateVO> getOrderByStateFromOrders(String state, String token);

    OrderInfoFromSpec getSpecInfo(Integer goodsDetailId);


    MallOrderGoodsInfoVO getOderByStateFromGoods(Integer goodsId);

    void deleteOrder(String id);

    void settleAccounts(List<MallSettleAccountsBO> settleAccountsBOS);

    void pay(String id);

    void confirmReceive(String id);

    CommentInfoFromOrder updateOrderOfHasComment(Integer orderId);

    void sendComment(MallSendContentBO sendContentBO, CommentInfoFromOrder commentInfo);

    String getStockNum(Integer goodsDetailId);

    void reduceSpec(Integer goodsDetailId, int i);
}
